package com.industrial.operation.controller;

import com.industrial.common.core.web.controller.BaseController;
import com.industrial.common.core.web.domain.AjaxResult;
import com.industrial.common.core.web.page.TableDataInfo;
import com.industrial.common.security.annotation.RequiresPermissions;
import com.industrial.operation.domain.SysDataReportingScoreAppeal;
import com.industrial.operation.service.ISysDataReportingScoreAppealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 申诉新Controller
 *
 * @author deji
 * @date 2024-01-20
 */
@RestController
@RequestMapping("/appeal")

public class SysDataReportingScoreAppealController extends BaseController {

    @Autowired
    private ISysDataReportingScoreAppealService sysDataReportingScoreAppealService;

    /**
     * 查询申诉列表
     */
    @RequiresPermissions("operation:appeal:list")
    @GetMapping("/list")
    public TableDataInfo list(SysDataReportingScoreAppeal sysDataReportingScoreAppeal)
    {
        startPage();
        List<SysDataReportingScoreAppeal> list = sysDataReportingScoreAppealService.selectSysDataReportingScoreAppealList(sysDataReportingScoreAppeal);
        return getDataTable(list);
    }

    /**
     * 查看申诉详情
     * @param baseId
     * @return
     */
    @RequiresPermissions("operation:appeal:qxq")
    @GetMapping("/getScoreAppeaInfoByBaseId/{baseId}")
    public AjaxResult getScoreAppeaInfoByBaseId(@PathVariable("baseId") String baseId){
        return sysDataReportingScoreAppealService.getScoreAppeaInfoByBaseId(baseId);
    }

    @RequiresPermissions("operation:appeal:check")
    @PostMapping("/checkScoreAppea")
    public AjaxResult checkScoreAppea(@RequestBody SysDataReportingScoreAppeal params){
        return sysDataReportingScoreAppealService.checkScoreAppea(params);
    }

}
